package com.sxd.service.service;

import com.sxd.service.maper.UserMapper;
import com.sxd.service.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 根据id查用户
     *
     * @param id
     * @return
     */
    public User queryById(Long id) {
        User user = userMapper.selectByPrimaryKey(id);
        return user;
    }
}
